package com.gec.zhs.entity.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 系统消息表
 * @TableName sysmessage
 */
@TableName(value ="sysmessage")
@Data
public class Sysmessage implements Serializable {
    /**
     * 
     */
    @TableId
    private String id;

    /**
     * 
     */
    private String typename;

    /**
     * 
     */
    private String typeid;

    /**
     * 
     */
    private String fromid;

    /**
     * 
     */
    private String toid;

    /**
     * 
     */
    private String fromname;

    /**
     * 
     */
    private String toname;

    /**
     * -1:已删除；0:默认
     */
    private Integer fromstatus;

    /**
     * -1:已删除；0:默认未读；1：已读
     */
    private Integer tostatus;

    /**
     * 点击消息跳转的页面等
     */
    private String href;

    /**
     * 
     */
    private String title;

    /**
     * 
     */
    private String content;

    /**
     * 
     */
    private Date createtime;

    /**
     * 
     */
    private String createid;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Sysmessage other = (Sysmessage) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getTypename() == null ? other.getTypename() == null : this.getTypename().equals(other.getTypename()))
            && (this.getTypeid() == null ? other.getTypeid() == null : this.getTypeid().equals(other.getTypeid()))
            && (this.getFromid() == null ? other.getFromid() == null : this.getFromid().equals(other.getFromid()))
            && (this.getToid() == null ? other.getToid() == null : this.getToid().equals(other.getToid()))
            && (this.getFromname() == null ? other.getFromname() == null : this.getFromname().equals(other.getFromname()))
            && (this.getToname() == null ? other.getToname() == null : this.getToname().equals(other.getToname()))
            && (this.getFromstatus() == null ? other.getFromstatus() == null : this.getFromstatus().equals(other.getFromstatus()))
            && (this.getTostatus() == null ? other.getTostatus() == null : this.getTostatus().equals(other.getTostatus()))
            && (this.getHref() == null ? other.getHref() == null : this.getHref().equals(other.getHref()))
            && (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle()))
            && (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent()))
            && (this.getCreatetime() == null ? other.getCreatetime() == null : this.getCreatetime().equals(other.getCreatetime()))
            && (this.getCreateid() == null ? other.getCreateid() == null : this.getCreateid().equals(other.getCreateid()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getTypename() == null) ? 0 : getTypename().hashCode());
        result = prime * result + ((getTypeid() == null) ? 0 : getTypeid().hashCode());
        result = prime * result + ((getFromid() == null) ? 0 : getFromid().hashCode());
        result = prime * result + ((getToid() == null) ? 0 : getToid().hashCode());
        result = prime * result + ((getFromname() == null) ? 0 : getFromname().hashCode());
        result = prime * result + ((getToname() == null) ? 0 : getToname().hashCode());
        result = prime * result + ((getFromstatus() == null) ? 0 : getFromstatus().hashCode());
        result = prime * result + ((getTostatus() == null) ? 0 : getTostatus().hashCode());
        result = prime * result + ((getHref() == null) ? 0 : getHref().hashCode());
        result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode());
        result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode());
        result = prime * result + ((getCreatetime() == null) ? 0 : getCreatetime().hashCode());
        result = prime * result + ((getCreateid() == null) ? 0 : getCreateid().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", typename=").append(typename);
        sb.append(", typeid=").append(typeid);
        sb.append(", fromid=").append(fromid);
        sb.append(", toid=").append(toid);
        sb.append(", fromname=").append(fromname);
        sb.append(", toname=").append(toname);
        sb.append(", fromstatus=").append(fromstatus);
        sb.append(", tostatus=").append(tostatus);
        sb.append(", href=").append(href);
        sb.append(", title=").append(title);
        sb.append(", content=").append(content);
        sb.append(", createtime=").append(createtime);
        sb.append(", createid=").append(createid);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}